<template>
  <div class="TvmTicketCYXC HuikuiInfo el-card is-always-shadow el-card__body">
    <el-dialog
      title="结账单据"
      :visible.sync="dialogVisible"
      @close="closed"
      width="80%">
      <avue-crud
        ref="JZDJ"
        :option="option"
        :table-loading="listLoading"
        :data="list">
      </avue-crud>
    </el-dialog>
  </div>
</template>


<script>
  import {getForm, postForm} from '@/api/gen/gen'
  import ExportJsonExcel from "js-export-excel";
  import {
    clearSelect,
    electromeReasons,
    getQianxiangType,
    qianxiangType,
    selectReasons,
    fenExYuangettoFixed,
    getLineName,
    getStationName,
    getElectromeReasons,
    xieChaStatus,
    getXieChaStatusFormat,
    replayStatus,
    getreplayStatusFormat,
    repalceStatus, getRepalceStatus, numToTwoPoint
  } from "../../../../api/subwayRat/commonCheck";
  import {
    getSwAuTvmDailyBillAssistDetail,
    getSwAuTvmDailyBillAssistList
  } from "../../../../api/subwayRat/TVMRevenueVarianceAudit.TvmChaYiDXC/TvmJiezhangdanjuxiecha";
  import {chaKanJieZhangInfo} from "../../../../api/subwayRat/TVMRevenueVarianceAudit/differencesInAudit/fareDifferencesInAudit";
  export default {
    components:{
    },
    data() {
      return {
        dialogVisible:true,
        option:{},
        listLoading: true,
        list:[]
    }
    },
    created() {
      this.getOption();
    },
    methods: {
      async recallShow(row){
        //这里的接口要换成 sw_st_tvm_daily_bill 和 sw_st_tvm_daily_bill_cash_pay
        let detailData = await chaKanJieZhangInfo(row);
        debugger
        this.list = detailData.data.data;
        this.listLoading = false;
      },
      closed(){
        this.dialogVisible=false;
        this.$parent.isShowDia=false;
      },
      getOption(){
        this.option={
          emptyBtn:false,
          editBtn:false,
          delBtn:false,
          addBtn:false,
          index:true,
          indexLabel:'序号',
          menu:false,
          page:false,
          menuWidth:150,
          align:'center',
          menuAlign:'center',
          selection: false,
          reserveSelection:false,
          column:[
          {prop:'tvmCode',label:'TVM编号',type:'select',search:false},
          {prop:'receiveNotes',label:'接收纸币',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'receiveCoin',label:'接收硬币',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'noteChangen',label:'纸币找零',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'coinChange',label:'硬币找零',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'faultRefundAmount',label:'故障退款',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'receiveTotalMoney',label:'接收总计',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'changeTotalMoney',label:'找零总计',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'sellTicketTotalMoney',label:'售票总计',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'rechargeMoney',label:'充值总计',formatter:function (row,value , label, column) {
              return numToTwoPoint(value);
            }},
          {prop:'startTime',label:'开始时间',type:'date',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd'},
          {prop:'endTime',label:'结束时间',type:'date',format:'yyyy-MM-dd',valueFormat:'yyyy-MM-dd'}
          ]
        }
        this.isReload=false;
        this.$nextTick(()=>{
          this.isReload=true;
        })
      },
    },
    mounted() {

    }
  }
</script>
<style lang="scss">
  .TvmTicketCYXC.HuikuiInfo{
    .avue-group[index='3']{
      .el-form-item{
        min-width: 450px;
      }
      .avue-form__row{
        width: 70%;
      }
    }
  }
</style>
